home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 52
/
Amiga Format AFCD52 (Issue 136, May 2000).iso
/
-in_the_mag-
/
workbench
/
scanning
/
scantrax
/
register.bat
< prev
next >
Wrap
DOS Batch File
|
2000-03-05
|
9KB
|
384 lines
; ScanTrax Register-Script $VER: ScanTrax register-script V1.3 ©1998 Klaus Krause
(set #novice 0)
(set #average 1)
(set #expert 2)
(user #average)
(complete 0)
(set #germ (= @language "deutsch"))
(set #engl (= #germ 0))
(if #germ (set @abort-button "Registrierung abbrechen"))
(if #engl (set @abort-button "Abort registration"))
(if #germ (set #loctxt (cat
"\nVielen Dank, daß Sie sich Registrieren möchten.\n"
)))
(if #engl (set #loctxt (cat
"\nMany thanks, that you want register.\n"
)))
(message #loctxt)
(if #germ (set #loctxt (cat
"\nEs folgen einige Fragen zu Ihrer Adresse...\n"
)))
(if #engl (set #loctxt (cat
"\nSome questions about your address follows...\n"
)))
(message #loctxt)
;--------------------------------------------------------------------------------------
;find out personal registration data
(set #emptystring5 "_____")
(set #emptystring10 "__________")
(set #emptystring15 "_______________")
(set #emptystring25 "_________________________")
(if #germ
(
(set #p_firstname " Vorname : ")
(set #p_secondname " Nachname : ")
(set #p_street " Strasse : ")
(set #p_zipcode " Postleitzahl : ")
(set #p_town " Stadt : ")
(set #p_country " Land : ")
(set #p_email " E-Mail : ")
(set #myhardware " Meine Hardware:\n")
(set #p_scanner " Scanner : ")
(set #p_Amiga " Amiga : ")
(set #p_CPU " CPU : ")
(set #p_GfxCard " Grafikkarte : ")
(set #p_emailkey " Ich möchte mein Keyfile per E-Mail erhalten J/N : ")
(set #p_airmaildisk " Ich möchte eine Programmdiskette erhalten J/N : ")
(set #yes "JA")
(set #no "NEIN")
)
)
(if #engl
(
(set #p_firstname " First name : ")
(set #p_secondname " Last name : ")
(set #p_street " Street : ")
(set #p_zipcode " Zip (postal) Code : ")
(set #p_town " Town : ")
(set #p_country " Country : ")
(set #p_email " E-mail : ")
(set #myhardware " My hardware:\n")
(set #p_scanner " Scanner : ")
(set #p_Amiga " Amiga : ")
(set #p_CPU " CPU : ")
(set #p_GfxCard " Graphic card : ")
(set #p_emailkey " I would like to get my keyfile by e-mail Y/N : ")
(set #p_airmaildisk " I would like to get a program floppydisk Y/N : ")
(set #yes "YES")
(set #no "NO")
)
)
(set #firstname
(askstring
(prompt #p_firstname)
(help @askstring-help)
)
)
(set #secondname
(askstring
(prompt #p_secondname)
(help @askstring-help)
)
)
(set #street
(askstring
(prompt #p_street)
(help @askstring-help)
)
)
(set #zipcode
(askstring
(prompt #p_zipcode)
(help @askstring-help)
)
)
(set #town
(askstring
(prompt #p_town)
(help @askstring-help)
)
)
(set #country
(askstring
(prompt #p_country)
(help @askstring-help)
)
)
(set #email
(askstring
(prompt #p_email)
(help @askstring-help)
)
)
(complete 25)
(message
(if #germ "Es folgen Fragen zu Ihrer verwendeten Hardware...\n")
(if #engl "Questions about your used hardware follows...\n")
)
(set #scanner
(askstring
(prompt #p_scanner)
(help @askstring-help)
)
)
(set #Amiga
(askstring
(prompt #p_Amiga)
(help @askstring-help)
)
)
(set #CPU
(askstring
(prompt #p_CPU)
(help @askstring-help)
)
)
(set #GfxCard
(askstring
(prompt #p_GfxCard)
(help @askstring-help)
)
)
(complete 50)
(if (> (strlen #email) 0)
(
(if #germ (set #loctxt "Ich möchte mein \"Keyfile\" per E-Mail erhalten!\n"))
(if #engl (set #loctxt "I would get my \"keyfile\" by e-mail!\n"))
(set #bool_emailkey
(askchoice
(prompt #loctxt)
(help @askchoice-help)
(choices #no #yes)
(default 1)
)
)
)
(
(set #bool_emailkey 0)
)
)
(if #bool_emailkey
(
(if #germ (set #loctxt "Sie haben sich für E-Mail entschieden.\n Wollen Sie zusätzlich auch noch eine Programmdiskette erhalten?\n"))
(if #engl (set #loctxt "You have choosen e-mail. Do you want to get additional a program floppydisk?\n"))
(set #bool_airmaildisk
(askchoice
(prompt #loctxt)
(help @askchoice-help)
(choices #no #yes)
(default 0)
)
)
)
(
(set #bool_airmaildisk 1)
)
)
(if #bool_emailkey
(set #emailkey #yes)
(set #emailkey #no)
)
(if #bool_airmaildisk
(set #airmaildisk #yes)
(set #airmaildisk #no)
)
;make blank lines on empty fields
(if (= #firstname "")
(if (= #secondname "")
(
(set #emailkey #emptystring5)
(set #airmaildisk #emptystring5)
)
)
)
(if (= #firstname "") (set #firstname #emptystring15))
(if (= #secondname "") (set #secondname #emptystring15))
(if (= #street "") (set #street #emptystring25))
(if (= #zipcode "") (set #zipcode #emptystring10))
(if (= #town "") (set #town #emptystring15))
(if (= #country "") (set #country #emptystring15))
(if (= #email "") (set #email #emptystring15))
(if (= #scanner "") (set #scanner #emptystring15))
(if (= #Amiga "") (set #Amiga #emptystring15))
(if (= #CPU "") (set #CPU #emptystring15))
(if (= #GfxCard "") (set #GfxCard #emptystring15))
(if #engl (set #header1 (cat
"\n"
" ScanTrax Registration Form\n"
" --------------------------\n\n\n"
" I would like to become a registered user.\n"
" I have read the chapters and \"Registration\" and \"Copyright\"\n"
" in the manual and agree with these.\n"
)))
(if #germ (set #header1 (cat
"\n"
" ScanTrax Registrierungs Formular\n"
" --------------------------------\n\n\n"
" Ich möchte registrierter Benutzer werden.\n"
" Ich habe die Abschnitte \"Registrierung\" und \"Copyright\"\n"
" im Manual gelesen und stimme diesen zu.\n"
)))
(if #germ (set #signline (cat
"\n"
" -------------------------\n"
" (Hier Unterschreiben)\n"
)))
(if #engl (set #signline (cat
"\n"
" -------------------------\n"
" (Sign here)\n"
)))
(if #engl (set #end1 (cat
" Put into an envelope this registration form and\n"
" 20 US-Dollar or 30 Deutsche-Mark.\n\n"
" Post your registration form to:\n\n"
" Klaus Krause\n"
" Bergstedter Chaussee 233\n"
" D-22395 Hamburg\n"
" -GERMANY-\n"
)))
(if #germ (set #end1 (cat
" Nimm einen Umschlag, lege 30 Deutsche Mark und dieses\n"
" Registrierungsformular hinein.\n\n"
" Versende Deine Registrierung an:\n\n"
" Klaus Krause\n"
" Bergstedter Chaussee 233\n"
" D-22395 Hamburg\n"
" -GERMANY-\n"
)))
;build final form
(set #finaltext (cat
#header1 "\n"
#p_firstname #firstname "\n\n"
#p_secondname #secondname "\n\n"
#p_street #street "\n\n"
#p_town #town "\n\n"
#p_zipcode #zipcode "\n\n"
#p_country #country "\n\n"
#p_email #email "\n\n\n\n"
#signline "\n\n\n\n"
#myhardware "\n"
#p_scanner #scanner "\n\n"
#p_Amiga #Amiga "\n\n"
#p_CPU #CPU "\n\n"
#p_GfxCard #GfxCard "\n\n\n"
#p_emailkey #emailkey "\n\n"
#p_airmaildisk #airmaildisk "\n\n\n\n"
#end1
))
(complete 75)
;save form
(set #formulardir
(askdir
(if #germ (prompt "Wo möchten Sie Ihr\n Registrierungsformular \speichern?"))
(if #engl (prompt "Were do you want to save your\n registration-form?"))
(help @askdir-help)
(default "")
(disk)
)
)
;confirm print
(if #germ (set #loctxt "Wollen Sie Ihre Registrierung sofort ausdrucken?\n"))
(if #engl (set #loctxt "Do you want to print your registration now?\n"))
(set #bool_print
(askchoice
(prompt #loctxt)
(help @askchoice-help)
(choices #no #yes)
(default 0)
)
)
;set filename
(if #germ (set #filename "Registrierung.form"))
(if #engl (set #filename "Registration.form"))
(set @app-name #filename)
(set @default-dest #formulardir)
;save form
(textfile
(dest (tackon #formulardir #filename))
(append #finaltext)
(confirm)
)
;make form icon
(set #iconname "Register.icon")
(if (exists #iconname (noreq))
(copyfiles
(source #iconname)
(dest #formulardir)
(newname (cat #filename ".info"))
(files)
(nogauge)
)
)
;print form
(if #bool_print
(textfile
(dest "PRT:")
(append #finaltext)
(confirm)
)
)
(complete 100)
;last words
(if #engl (exit "End of registration!\n\n Thank you"))
(if #germ (exit "Ende der Registrierung!\n\n Vielen Dank"))
(set @default-dest #formulardir)
(welcome)